package com.andy.controller;

import com.andy.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmailController {

    @Autowired
    private EmailService emailService;

    @RequestMapping("/email/{email}/{code}")
    public boolean email(@PathVariable String email,@PathVariable String code){
        return emailService.email(email,code);
    }

}
